<!-- target:message -->
<form name="messageSearchForm" class="ui-hide">
    <!-- <input class="ui-hide" type="text" name="searchContent"> -->
</form>
<ul ui="type:mao.ui.AppListView;id:message-list-view;customEmpty:true;" class="list-items">
    <div>
        <div class="no-data">
            <img src="images/base/icon_default.png">
            <p>暂无数据</p>
        </div>  
    </div>
</ul>

<!-- target: messageItem -->
<li class="={${item.readStatus} === 2 ? 'read' : ''}">
    <!-- if: ${item.type} === 1 -->
        <!-- use:home.approve-item(item=${item}) -->
    <!-- elif: ${item.type} === 2 -->
        <!-- use:home.message-item(item=${item}) -->
    <!-- elif: ${item.type} === 3 -->
        <!-- use:home.warn-item(item=${item}) -->
    <!-- elif: ${item.type} === 4 -->
        <!-- use:home.system-item(item=${item}) -->
    <!-- elif: ${item.type} === 5 -->
        <!-- use:home.system-other-item(item=${item}) -->
    <!-- /if -->

</li>

<!-- target:approve-item -->
<!-- //审批消息 -->
<!-- var: name = String.prototype.slice.call(${item.creatorName}, 0, 1) -->

<!-- //暂时过滤巡演消息 -->
<!-- if:${item.module} === 1 && ${item.moduleType} === 3 -->
<div class="select-people-item message-item"> 
<!-- else -->
<div  ui="type:NS.MessageItem;messageId:${item.id};ext-link;text:${item.name};value:${item.id};" href="={${mao.info.baseInfo.detailRoutes}[${item.module}]}~orderSn=${item.recordId}~msgId=${item.id}~moduleType=${item.moduleType}~DENY_CACHE" class="select-people-item message-item"> 
<!-- /if -->
    <div class="message-item-cont approve">
        <div class="title">
            <!-- if: ${item.imageUrl} -->
            <img src="${item.imageUrl}" />
            <!-- else -->
            <div class="head">${name}</div>
            <!-- /if -->
            <div class="name">${item.creatorName}</div>
            <div class="time">${item.ctime|dayFormat('yyyy-MM-dd HH:mm')}</div>
        </div>
        <div class="info">
            <div class="info-item info-item-name">
                <div class="label">[${item.typeDesc}]</div>
                <div class="text">={${mao.info.baseInfo.messageType}[${item.module}][${item.moduleType}]}审核</div>
            </div>
            <div class="info-item">
                <div class="label">项目名称</div>
                <div class="text">${item.recordName}</div>
            </div>
            <!-- var: state = ['', 'wait', 'reject', 'pass'] -->
            <!-- <div class="info-item ={${state}[${item.auditState}]}">
                <div class="label">${item.auditStateDesc}</div>
                <div class="text"></div>
            </div> -->
            <!-- if: ${item.module} === 6 -->
            <div class="info-item">
                <div class="label">请尽快到web端完成审核操作</div>
            </div>
            <!-- /if -->
        </div>
    </div>
</div>

<!-- target:message-item -->
<!-- //通知消息 -->
<!-- var: name = String.prototype.slice.call(${item.creatorName}, 0, 1) -->

<!-- //暂时过滤巡演消息 -->
<!-- if:${item.module} === 1 && ${item.moduleType} === 3 -->
<div class="message-item" ui="type:NS.MessageItem;messageId:${item.id}"> 
<!-- else -->
<div  ui="type:NS.MessageItem;messageId:${item.id};ext-link;text:${item.name};value:${item.id};" href="={${mao.info.baseInfo.detailRoutes}[${item.module}]}~orderSn=${item.recordId}~msgId=${item.id}~moduleType=${item.moduleType}~DENY_CACHE" class="message-item"> 
<!-- /if -->
    <div class="message-item-cont message">
        <div class="title">
            <!-- if: ${item.imageUrl} -->
            <img src="${item.imageUrl}" />
            <!-- else -->
            <div class="head">${name}</div>
            <!-- /if -->
            <div class="name">${item.creatorName}</div>
            <div class="time">${item.ctime|dayFormat('yyyy-MM-dd HH:mm')}</div>
        </div>
        <div class="info">
            <div class="info-item info-item-name">
                <div class="label">[${item.typeDesc}]</div>
                <div class="text">={${mao.info.baseInfo.messageType}[${item.module}][${item.moduleType}]}审核状态通知</div>
            </div>
            <div class="info-item">
                <div class="label">项目名称</div>
                <div class="text">${item.recordName}</div>
            </div>
            <div class="info-item">
                <div class="label">审核状态</div>
                <div class="text">${item.auditState|parseBaseInfo('messageAuditState')}</div>
            </div>
            <!-- if: ${item.module} === 6 -->
            <div class="info-item">
                <div class="label">请尽快到web端完成审核操作</div>
            </div>
            <!-- /if -->
        </div>
    </div>
</div>

<!-- target:warn-item -->
<!-- //预警消息 -->
<!-- var: names = ['', '预约到期', '合同逾期'] -->
<!-- var: name = String.prototype.slice.call(${item.creatorName}, 0, 1) -->
<div class="message-item" ui="type:NS.MessageItem;messageId:${item.id}"> 
    <div class="message-item-cont warn">
        <div class="title">
            <img src="images/index/warn_message_icon.png" />
            <div class="name">={${names}[${item.module}]}</div>
            <div class="time">${item.ctime|dayFormat('yyyy-MM-dd HH:mm')}</div>
        </div>
        <div class="info">
            <div class="info-item info-item-name">
                <div class="label">[${item.typeDesc}]</div>
                <div class="text">到期提醒</div>
            </div>
            <div class="info-item">
                <div class="label">项目名称</div>
                <div class="text">${item.recordName}</div>
            </div>
            <div class="info-item">
                <div class="label">预约时间</div>
                <div class="text">${item.startTime|dateFormat('yyyy-MM-dd HH:mm')}</div>
            </div>
        </div>
    </div>
</div>

<!-- target:system-item -->
<!-- //系统消息 -->
<!-- var: name = String.prototype.slice.call(${item.creatorName}, 0, 1) -->
<div class="message-item" ui="type:NS.MessageItem;messageId:${item.id}"> 
    <div class="message-item-cont system">
        <div class="title">
            <!-- if: ${item.imageUrl} -->
            <img src="${item.imageUrl}" />
            <!-- else -->
            <div class="head">${name}</div>
            <!-- /if -->
            <div class="name">${item.creatorName}</div>
            <div class="time">${item.ctime|dayFormat('yyyy-MM-dd HH:mm')}</div>
        </div>
        <div class="info">
            <div class="info-item info-item-name">
                <div class="label">[${item.typeDesc}]</div>
                <div class="text">合同审核状态通知</div>
            </div>
            <div class="info-item">
                <div class="label">项目名称</div>
                <div class="text">${item.recordName}</div>
            </div>
            <div class="info-item">
                <div class="label">审核状态</div>
                <div class="text">${item.auditState|parseBaseInfo('messageAuditState')}</div>
            </div>
        </div>
    </div>
</div>
<!-- target:system-other-item -->
<!-- //系统消息 -->
<!-- var: name = String.prototype.slice.call(${item.creatorName}, 0, 1) -->
<div class="message-item" ui="type:NS.MessageItem;messageId:${item.id};ext-link" href="#/approval/approve~DENY_CACHE"> 
    <div class="message-item-cont system-other">
        <div class="title">
            <img src="images/index/warn_message_icon.png" />
            <div class="name">待审核提醒</div>
            <div class="time">${item.ctime|dayFormat('yyyy-MM-dd HH:mm')}</div>
        </div>
        <div class="info">
            <div class="info-item info-item-name">
                <div class="label">[${item.typeDesc}]</div>
                <div class="text">待审核提醒</div>
            </div>
            <div class="info-item">
                <div class="label">事件名称</div>
                <div class="text">${item.recordName}</div>
            </div>
        </div>
    </div>
</div>

